home *** CD-ROM | disk | FTP | other *** search
- Path: status.gen.nz!usenet
- From: Alan Howard <duck@central.co.nz>
- Newsgroups: comp.lang.c
- Subject: Parsing filenames
- Date: Thu, 18 Apr 1996 16:27:57 -0700
- Organization: RNZAF
- Message-ID: <3176CFFD.6723@central.co.nz>
- NNTP-Posting-Host: duck.central.co.nz
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- I am copying shareware files from a CD to a HDD to compile a CD-R of my
- own full of back-up info. The files in question are ex Amiga 1200 an all
- have long filenames full of illegal spaces (0x20) and asterisks...
- MS-Dos truncates the long filenames into 8.3 but leaves duplicates in
- each dir ie, 'robots in the park' and 'robots in the garden' both convert
- to 'robots i'.
- I know that the file names in each dir are stored in the dir entry on the
- HDD (used nortons utilities v 8 to look) and am considering coding a
- stub to do something like...
-
- 1. Identify the next file to be transferred from CD to HDD.
- 2. Open the illegally named file.
- 3. Fix filename, swap 0x20's for u'scores etc, rename dups...
- 4. Create new file on HDD using new name.
- 5. Transfer data from CD to HDD.
-
- Problem is that dos (hence Turbo C++) recognises the file to be opened
- but the spaces vanish when it tries to open the file ie 'one bar' becomes
- 'onebar' and the open fails, in Dos and TC++.
-
- Can anyone help me get around this problem. How do I open an illegally
- named file and then transfer the data associated with it from A to B???
- How are the dir entries formatted, How can I find a specific entry, look
- in it, find the beginning cluster for an arbitrary file, convert this
- info to C function calls and shift the data??????
-
- I'm stuffed. Please Help
-
- Thanks in advance, Alan...
-